========BUILD pcre============================
PCRE is required but not longer bundled with httpd 2.4 we need to compile it .
    download from http://www.pcre.org
    ./configure --prefix=/root/modules/pcre/output
	make 
	make install
    
========BUILD OPENSSL============================

build openssl:
download the source code for Linux and decompress it
cd openssl-1.0.x

WARNNING: make sure perl must in "/usr/bin/perl" not in "/usr/local/bin/perl"  or any other place.
./config --prefix=/root/modules/openssl/output threads shared
make clean
make
make install

========BUILD HTTPD============================
WARNNING when specify the openssl path, please make sure it is not openssl so lib path, ./configure will append lib automatically. 
           Otherwise your apached is complied with OS's openssl.

Pre-build:
httpd requires apr, apr-util 1.6.x . firstly, download the latest versions of both APR and APR-Util from Apache APR, unpack them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util (be sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use ./configure's --with-included-apr option.	

Build apache: 
./configure --prefix=/root/modules/httpd/output/ --with-included-apr --enable-so --enable-ssl=static --with-ssl=/root/modules/openssl/output/ --with-pcre=/root/modules/pcre/output --enable-mods-shared=all --enable-modules=most --enable-mpms-shared=all 
make
make install
(Note: pay attention to above that the openssl is compiled from source code rather than copied from Application/modules/openssl. 
 please refer to below instruction about how to compile openssl)
 
========BUILD MOD_JK============================

cd tomcat-connectors-1.2.x-src/native
./configure --with-apxs=/root/modules/httpd/output/bin/apxs
make
make install
(pay attention to set the openssl library path before build it: export LD_LIBRARY_PATH=/root/modules/openssl/output/lib/, 
 otherwise you cannot build it successfully.)




